
function validarLogin(){
    var login = document.getElementById("login").value;
    var expRegLogin = /^([0-9a-zA-Z]){8,20}$/;
    
    if(login.search(expRegLogin) == -1){
        var elem = document.getElementById("login");
        elem.style.color = "red";
        return false;
    }else{
        var elem = document.getElementById("login");
        elem.style.color = "blue";
        return true;
    }
}